home *** CD-ROM | disk | FTP | other *** search
/ AMIGA PD 1 / AMIGA-PD-1.iso / NetBSD / docs-netbsd / Mailinglist-Archive / 1994-10.gz / 1994-10 / 000463_owner-current-users@netbsd.org_Wed Oct 19 06:20:47 1994.msg < prev    next >
Text File  |  1994-11-20  |  899b  |  29 lines

  1. From: mycroft@gnu.ai.mit.edu
  2. To: current-users@netbsd.org
  3. Subject: File system problems
  4. Sender: owner-current-users@netbsd.org
  5.  
  6.  
  7. These are definitely caused by (a?) bogus ftruncate() or lseek() call
  8. that has the wrong type for the second argument.  Often this causes
  9. random garbage to be passed in the upper 32 bits of the offset.  This,
  10. combined with a major bug I just located in FFS, is almost certainly
  11. what's been trashing a few people's file system.
  12.  
  13. I'd suggest, for now, changing the test at the top of ffs_truncate()
  14. from:
  15.  
  16.         if (length < 0)
  17.                 return (EINVAL);
  18.  
  19. to:
  20.  
  21.     if (length < 0 || length > 0xffffffffLL)
  22.         return (EINVAL);
  23.  
  24. and putting a similar test in ufs_seek().  This will alleviate the
  25. symptoms until the problem is fixed correctly.
  26.  
  27. I'd also suggest finding and *fixing* the bad calls in whatever 3rd
  28. party programs you are using.
  29.